﻿using Orleans;
using Pay.Model.Dto;
using Pay.Model.Enums;
using Pay.Model.Interfaces;
using Pay.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Service.user
{
    public interface IUserSerive:IGrainWithStringKey
    {



        /// <summary>
        /// 根据merchantid获取商户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<MerchantInfo> GetMerchantById(long id);

        /// <summary>
        /// 更新商户
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        Task<bool> UpdateMerchant(MerchantInfo user);

       
        Task<long> AddMerchantUser(MerchantInfo info);
        Task<UserInfo> GetUserById(long userId);

        Task<UserInfo> GetByUserName(string userName);
        Task<LoginOutPut> UserLogin(LoginOutPut input);

        Task<List<Menu>> GetAllMeun(long userId);

        Task<bool> Add(UserAddModel user);

        Task<bool> Delete(long userId);

        Task<bool> Update(UserInfo user);
        Task<IPagedOutput<UserOutPut>> GetUserPage(long? mId,UserType? type, string searchWord, DateTime? timeBegin = null, DateTime? timeEnd = null, int offset = 10, int rows = 1);
    }
}
